import request from '@/utils/request'

// api地址
const api = {
  add: 'points/doExchang',
  cash: 'points/cashExchang',
  getAppInfo: 'AppConfig/getAppInfo',
  cashList: 'points/cashList',
}

// 积分兑换操作
export const add = (data) => {
  return request.post(api.add, { form: data })
}

// 获取后台配置的应用信息
export const getAppInfo = (param) => {
  return request.post(api.getAppInfo, param)
}

// cash兑换操作
export const cash = (data) => {
  return request.post(api.cash, { form: data })
}

// cash兑换明细列表
export const cashList = (param) => {
  return request.get(api.cashList, param)
}